<table>
	<tr>
		<td colspan="4" style="text-align: center"><?php echo $my_group_name[0]['groups']['group_name']; ?></td>
	</tr>
	<tr>
		<th>Name</th>
		<th>Surname</th>
		<th>Email</th>
		<th>Delete user from the group</th>
	</tr>
	<?php foreach ($my_groups as $my_group): ?>
	<tr>
		<td><?php echo $my_group['users']['name']; ?></td>
		<td><?php echo $my_group['users']['surname']; ?></td>
		<td><?php echo $my_group['users']['email']; ?></td>
		<td style="text-align: center"><?php echo $this->Form->postLink($this->Html->image("admin/delete.gif", array("alt" => "delete_user")), array('action' => 'delete_user',$my_group_name[0]['groups']['id_group'], $my_group['users']['id_user']), array('escape' => false, 'confirm' => 'Are you sure?')); ?></td>

	</tr>
	<?php endforeach; ?>
</table>
<br/>
<br/>
<br/>
<?php
//this is the part concern the addition of a user to a group
echo $this->Form->create('Group', array('action' => 'add_user'));
echo $this->Form->input('email', array('label' => 'User email'));
echo $this->Form->hidden('id_group', array('value' => $my_group_name[0]['groups']['id_group'] ) );
echo $this->Form->end('Add');
